<template>
    <div>

      <ul>

        <h3>评论列表</h3>
        <li v-for="item in contentlist">
          <p>{{ get_username(item.uid) }}:{{item.content}}</p>

        </li>
      </ul>

    </div>
</template>

<script>
    export default {
        name: "comments",
      data(){
          return{

          }
      },
      //子组件接收父组件参数
      props:['contentlist','myuser'],


      mounted:function () {

      },
      methods:{

          //格式化用户名
        get_username:function (uid) {

          return this.myuser[uid];



        }

      }

    }
</script>

<style scoped>



</style>
